package com.briup.cms.service;


import com.briup.cms.exception.CustomerException;
import com.briup.cms.bean.Article;
import com.briup.cms.bean.BaseUser;
import com.briup.cms.exception.CustomerException;
import com.github.pagehelper.PageInfo;

/**
 * 用户相关接口
 */
public interface IBaseUserService {

    /**
     * 用户登录
     * @param username  用户名
     * @param password 密码
     * @return token字符串
     * @throws CustomerException  自定义异常
     */
    String login(String username,String password);

    BaseUser currentUserInfo(String token);

    PageInfo<BaseUser> pageQuery(int pageNum, int pageSize, String username, Integer role);
//    BaseUser findById(int id);

    void changeStatus(int id,int status) throws CustomerException;

    void deleteById(int id) throws CustomerException;

    void updateUserIcon(int id, String alterUserIcon) throws CustomerException;

    BaseUser selectByPrimaryKey(Integer id);
    void insert(BaseUser baseUser);
    void update(BaseUser baseUser);

    void delete(Integer id);

}